<?php 
include_once 'app/model/support/process.php';
include_once 'app/model/lienket/process.php';
include_once 'app/model/slider/process.php';
include_once 'app/model/page/process.php';

$support = new Support();
$lienket = new LienKet();
$slider = new Slider();
$pages = new Pages();

$fillAllSupport = $support->FillAll();
$fillAllLienket = $lienket->FillAll();
$fillAllSlider = $slider->FillAll();
$fillAllSliderDetail = $slider->FillAll();
$fillAllPages = $pages->FindAllLimit();
?>
<div id="banner">
    <div id="slider" class="nivoSlider">
        <?php while($rowSlider = mysql_fetch_array($fillAllSlider)) : ?>
            <a href="<?php echo $rowSlider["banner_link"] ?>"><img src="<?php echo $rowSlider["banner_url"] ?>" data-thumb="images/images_1.png" alt="<?php echo $rowSlider["description"] ?>" title="#<?php echo $rowSlider["sub_title"] ?>" /></a>
        <?php endwhile; ?>
    </div><!--End #slider-->
    <?php while($rowSliderDetail = mysql_fetch_array($fillAllSliderDetail)) : ?>
        <div id="<?php echo $rowSliderDetail["sub_title"] ?>" class="nivo-html-caption">
            <h3><?php echo $rowSliderDetail["title"] ?></h3>
            <?php echo $rowSliderDetail["description"] ?>
            <a href="<?php echo $rowSliderDetail["banner_link"] ?>" title="<?php echo $rowSliderDetail["title"] ?>"><?php echo $rowSliderDetail["title"] ?></a>. 
        </div><!--End #htmlcation-->
    <?php endwhile; ?>
</div><!--End #banner-->
<div id="news-post">                    
    <h2 class="title"><img src="<?php echo $url["home"] ?>/images/article-1.png" alt="Bài viết mới" align="absmiddle" /> Tin tức</h2>
    <div class="news-article">
        <ul>
            <?php while($rowPages = mysql_fetch_array($fillAllPages)) { ?>
            <li>
                <div class="thumb">
                    <img src="<?php echo $rowPages["page_image"] ?>" title="<?php echo $rowPages["page_title"] ?>" alt="<?php echo $rowPages["page_title"] ?>">
                </div>
                <div class="info">
                    <a href="<?php echo $url["home"]."/".$rowPages["page_link"] ?>"><?php echo $rowPages["page_title"] ?></a>
                </div>
                <div class="clr"></div>
            </li>
            <?php } ?>
        </ul>
    </div><!--End .jcarouse-->
    <h2 class="box_new_post_bottom"></h2>
</div><!--End #new-post-->
<div id="support">
    <div class="support">
        <div class="box-support">
            <h2><img src="<?php echo $url["home"] ?>/images/call-phone.png" align="absmiddle" alt="Hỗ trợ trực tuyến" /> Hỗ trợ trực tuyến</h2>
        </div>
        <div class="box_support_center">
            <?php 
                $count = 1;
                while($rowSupport = mysql_fetch_array($fillAllSupport)) : 
            ?>
            <span>
                <?php if($rowSupport["level"] == 0) : ?>
                <h4>Luật sư</h4>                
                <?php endif; ?>
                <?php if($rowSupport["level"] == 1) : ?>
                <h4>Chuyên viên <?php echo $count; $count++; ?></h4>                
                <?php endif; ?>               
                <a href="ymsgr:sendIM?<?php echo $rowSupport["yahoo_id"] ?>">
                    <img alt="Liên hệ qua Yahoo Messenger" src="http://opi.yahoo.com/online?u=<?php echo $rowSupport["yahoo_id"] ?>&m=g&t=1">
                </a>

                <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">
                </script>
                <a href="skype:<?php echo $rowSupport["skype_id"] ?>?call" onclick="return skypeCheck();">
                    <img src="http://mystatus.skype.com/smallclassic/<?php echo $rowSupport["skype_id"] ?>" width="70px" height="19px"/></a>
                <span class="red b"> <?php echo $rowSupport["phone"] ?></span>
            </span>
            <?php endwhile; ?>
        </div><!--End .box_support_center-->
        <div class="box_support_bottom"></div><!--End .box_support_bottom-->
    </div><!--End .support-->
    <div id="links-website">
        <h2>Liên kết website</h2>
        <div class="items-link">
            <select name="cboLinkWeb" onchange="window.open(this.options[this.selectedIndex].value, '_blank')">
                <?php while($rowLienket = mysql_fetch_array($fillAllLienket)) : ?>
                    <option value="<?php echo $rowLienket["lienket_link"] ?>" selected="selected"><?php echo $rowLienket["lienket_name"] ?></option>
                <?php endwhile; ?>
            </select>
        </div><!--End .items-link-->
    </div>
</div><!--End #support-->
<div class="clear"></div>